<?php
session_start();
?>
<?php
		include_once('config/db_conn.php');
		include_once('db_config/db_gigs.php');
		include_once('db_config/db_user.php');
		include_once('db_config/db_websetting.php');
		include_once('db_config/db_multiple_gigs.php');

		$websetting= new websetting();
		$websetting_id = '1';
		$rs_websetting=$websetting->uniq_websettings('websetting_id',$websetting_id);
		$data_websetting=mysql_fetch_array($rs_websetting);

		$user=new user();
		$gigs=new gigs();
		$multiple_gigs =new multipleGigs();
		$rs_multiple_gigs=$multiple_gigs->multiple_gigs_list();
		$catagory_id=$_REQUEST['id'];

		$rs=$gigs->uniq_gigs_list('catagory_id',$catagory_id);
		$i=0;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo $data_websetting['change_title']; ?></title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="javascript/jquery.min.js"></script>
<script type="text/javascript" src="javascript/jquery.simplemodal.js"></script>
<script type="text/javascript" src="javascript/init.js"></script>
<script type="text/javascript" src="javascript/init1.js"></script>
<script src="javascript/main.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
	/* this is just a simple reload; you can safely remove it; remember to remove it from the image too */
	function reloadCaptcha()
	{
		document.getElementById('captcha').src = document.getElementById('captcha').src+ '?' +new Date();
	}
</script>
<script language="javascript">
function openCenteredWindow(url) {
	parms = 'menubar=no,width=600,height=500,toolbar=no'
	name = "facebook_share"
	height=500
	width=600
   var left = Math.floor( (screen.width - width) / 2);
   var top = Math.floor( (screen.height - height) / 2);
   var winParms = "top=" + top + ",left=" + left + ",height=" + height + ",width=" + width;
   if (parms) { winParms += "," + parms; }
   var win = window.open(url, name, winParms);
   if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
   return win;
}
</script>
</head>
<body>
<div id="container" class="content">

<!--HEADER AREA-->
<?php include('header.php')?>
<!--HEADER AREA END-->
<div id="main" class="clearfix">
	<div class="main-tl">
	  	<div class="main-tr"></div>
	  	<div class="main-top"></div>
	</div>
	<div class="main-inner clearfix">
		<div class="side1">
		<!-- side1 content BEGIN ========================================================================================= -->
		<!-- search BEGIN -->
		<?php
	if(@$_SESSION['username_email']!='')
	{
	?>
		<div id="gigs-index" class="gigs form js-responses">
			<form method="post" id="GigAddForm" enctype="multipart/form-data"  action="manage_gigs.php" class="normal">
				<h2>What are you willing to do?</h2>
				<span class="will-info">I Will</span>
				<div class="input text required">
					<input type="text" name="gigs_title" id="gigs_title" value="" maxlength="255" /> for 
					<select name="multiple_gigs_id" id="multiple_gigs_id">
					<?php
					while($data_multiple_gigs=mysql_fetch_array($rs_multiple_gigs))
					{
					?>	
	                    <option value="<?php  echo $data_multiple_gigs['multiple_gigs_id'];?>"
						<?php if($data_multiple_gigs['multiple_gigs_id'] == 1)
						{
							echo 'selected';
	
						}?>
						><?php  echo $data_multiple_gigs['multiple_gigs_price'];?></option>
					<?php
					}
					?>
                  	</select>
				</div>			
				<div class="submit-block clearfix">
					<div class="submit"><input type="submit" value="Continue" /></div>			
				</div>
		    </form>
		</div>
		<?php
	}
	?>
		<!-- search END -->
		<!-- list BEGIN ========================================================================== -->
<ol class="list">
<?php
while($data=mysql_fetch_array($rs))
{	
	$rs_user=$user->uniq_user_list('user_id',$data['user_id']);
	$data_user=mysql_fetch_array($rs_user);
	$rs_mul_gigs=$multiple_gigs->uniq_multiple_gigs('multiple_gigs_id',$data['multiple_gigs_id']);
	$data_mul_gigs=mysql_fetch_array($rs_mul_gigs);
	?>
	<!-- item featured BEGIN========================-->
	<li class="clearfix">
		<div class="side1-info-l">
			<span class="featured">&nbsp;</span>		
			<p>
				<a href="users_<?php echo $data_user['user_name']; ?>_gigs_<?php  echo str_replace(' ','-', $data['gigs_title']);?>">
					<img src="gigsimg/<?php
						if($data['gigs_image'])
						echo $data['gigs_image'];
						else echo 'no_img.jpg' ?>" class="" alt="[Image: <?php echo $data['gigs_title']; ?>]" title="<?php echo $data['gigs_title'].' for $20'; ?>" width="106" height="76" />
				</a>
			</p>
		</div>
		<div class="side1-info-r">
			<h3>
				<a href="users_<?php echo $data_user['user_name']; ?>_gigs_<?php  echo str_replace(' ','-', $data['gigs_title']);?>" title="<?php  echo  $data['gigs_title'].' for '. $data_mul_gigs['multiple_gigs_price']; ?>"><span class="c">I will <?php  echo  $data['gigs_title'];?> for <?php echo $data_mul_gigs['multiple_gigs_price']; ?></span></a>	
			</h3>
			<p><?php  echo substr($data['gigs_description'],0,50);?>...<span> (by <a href="#" title="<?php echo $data_user['user_name']; ?>"><span class="c"><?php echo $data_user['user_name']; ?></span></a>)</span></p>
			<ul class="list1 clearfix">
	            <li class="read-more">
					<a href="users_<?php echo $data_user['user_name']; ?>_gigs_<?php  echo str_replace(' ','-', $data['gigs_title']);?>" title="Read more">Read more</a>	
				</li>					
	            <li class="read-more1">
					<a href="#" title="Like" class="like js-ajax-colorbox {source:&quot;js-dialog-body-login&quot;} cboxElement">Like</a>				</li>					
				<li class="share">
					<span title="Share" class="js-share-toggle-check">Share</span>
					<div style="display: block;">
						<ul class="share-list">
							<li class="facebook"><a href="#" onClick="openCenteredWindow('http://www.facebook.com/sharer.php?u=<?php echo 'http://'.$_SERVER['HTTP_HOST'];?>/users_<?php echo $data_user['user_name']; ?>_gigs_<?php echo str_replace(' ','-', $data['gigs_title']); ?>');" title="Share this gig in facebook" class="face">facebook</a></li>
							<li class="twitter"><a href="http://www.twitter.com/?status=<?php echo $data_user['user_name']; ?>:<?php  echo str_replace(' ','+', $data['gigs_title']);?>+<?php echo "http://".$_SERVER['HTTP_HOST']; ?>/users_<?php echo $data_user['user_name']; ?>_gigs_<?php  echo str_replace(' ','-', $data['gigs_title']);?>" target="blank" title="Tweet this gig" class="tweet">twitter</a></li>
							<li class="email"><a href="mailto:<?php echo $data_user['user_primary_email']; ?>?subject=<?php  echo str_replace(' ','%20', $data['gigs_title']);?>&amp;body=Hi,%0A%0ACheck%20it%20out:%20<?php echo "http://".$_SERVER['HTTP_HOST']; ?>/users_<?php echo $data_user['user_name']; ?>_gigs_<?php  echo str_replace(' ','-', $data['gigs_title']);?>" target="blank" title="mail" class="quick">email</a></li>
						</ul>
					</div>
				</li>				
				<li class="order-but">
					<a href="users_<?php echo $data_user['user_name']; ?>_gigs_<?php  echo str_replace(' ','-', $data['gigs_title']);?>" title="Order Now" class="js-ajax-colorbox {source:&quot;js-dialog-body-login&quot;} cboxElement">Order Now</a>					
				</li>
			</ul>
		</div>
	</li><!-- item featured END=====================-->
<?php
}
?>
</ol>
		<!-- list END =========================================================================-->
		<!-- side1 content END =========================================================================================== -->
		</div><!-- end side1 -->
		
		<!-- side2 BEGIN ====================== -->
		<?php include('right.php'); ?>
		<!-- side2 END ====================== -->
	</div><!-- end main-inner-->
</div><!-- end main -->

<!--FOOTER AREA-->
<?php include('footer.php');?>
 <!--FOOTER AREA END-->

</div><!-- end container -->
</body>
</html>